<%-- 
    Document   : list.jsp
    Created on : Jan 12, 2013, 10:56:49 AM
    Author     : Martin
--%>

<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="s" uri="http://stripes.sourceforge.net/stripes.tld" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <h1>Hello World!</h1>
        <s:useActionBean beanclass="cz.muni.fi.pa165.carpark.rest.EmployeeClientActionBean" var="actionBean"/>        

        <table id="basicview">
            <thead>
                <tr>
                    <th><f:message key="id"/></th>
                    <th><s:label name="employee.name"/></th>
                    <th><s:label name="employee.position"/></th>
                    <th></th>
                    <th></th>
                    <th></th>
                </tr>
            </thead>            
            <tbody>
                <c:forEach items="${actionBean.employees}" var="employee">
                    <tr>                 
                        <td>${employee.id}</td>
                        <td><c:out value="${employee.name}"/></td>
                        <td>Position</td>                    
                        <td><s:link class="button" beanclass="cz.muni.fi.pa165.carparkweb.actionbeans.EmployeeActionBean" event="delete"><s:param name="employee.id" value="${employee.id}"/><f:message key="delete"/></s:link> </td>
                        <td><s:link class="button" beanclass="cz.muni.fi.pa165.carparkweb.actionbeans.EmployeeActionBean" event="edit"><s:param name="employee.id" value="${employee.id}"/><f:message key="edit"/></s:link> </td>
                        <td><s:link class="button" beanclass="cz.muni.fi.pa165.carparkweb.actionbeans.BusinessTripActionBean" event="listTripsForEmployee"><s:param name="employee.id" value="${employee.id}"/><f:message key="employee.listTrips"/></s:link> </td>
                        </tr>
                </c:forEach>
            </tbody>            
        </table>
        <s:link class="button" beanclass="cz.muni.fi.pa165.carparkweb.actionbeans.EmployeeActionBean" event="add"><f:message key="createNew"/></s:link>

    </body>
</html>



